package com.gszy.auth.dao;

import com.gszy.auth.database.BeanHandler;
import com.gszy.auth.database.BeanListHandler;
import com.gszy.auth.database.JdbcTemplate;
import com.gszy.auth.entity.Product;

import java.util.List;

/**
 * @author MeUChT
 */
public class ProductDao {

    public List<Product> findAll(){

        return new JdbcTemplate().queryForList("select * from product",
                new BeanListHandler<>(Product.class));
    }
}
